package com.mark.spring.annotation.auto.assembly.autowired;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @Description: 模拟service层的使用
 * @Author: Mark
 * @CreateDate: 2019/5/26 21:50
 * @Version: 3.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
@Service
public class BookService {

    /**
     * 注入一个BookDao的bean，并且该bean的id为bookDao2
     */
    @Qualifier("bookDao")
    @Autowired(required = false)
    public BookDao bookDao;
}
